class Product {
  static count = 0;
  
  constructor(name, uniPrice, number) {
    this.name = name;
    this.uniPrice = uniPrice;
    this.number = number;
    Product.count++;
  }
  
  get totalPrice() {
    return this.number * this.uniPrice;
  }
  
  increase() {
    this.number ++;
  }
}

const p = new Product('apple', 5, 5);
console.log(p);
console.log(p.totalPrice);
